<?php
require_once 'db.php';


// 演示锁
// $result = $db->call('call user_procedure_0(@sum_id)', 'select @sum_id');
// var_dump($db->query("SELECT * FROM count WHERE prefix = 'd1'  LOCK IN SHARE MODE"));











// 幻读
$db->execute('START TRANSACTION');
var_dump('T2---新增数据 start === 》》 ');
var_dump($db->execute("insert into count values('d1d', 881,31)"));
var_dump('T2---新增数据 end === 》》 ');
var_dump($db->query("SELECT * FROM count WHERE prefix = 'd1d' "));
$db->execute('COMMIT');












//
